package com.ruoyi.wisdom.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wisdom.mapper.IotCompanyUserMapper;
import com.ruoyi.wisdom.domain.IotCompanyUser;
import com.ruoyi.wisdom.service.IIotCompanyUserService;

/**
 * 职工管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-20
 */
@Service
public class IotCompanyUserServiceImpl implements IIotCompanyUserService 
{
    @Autowired
    private IotCompanyUserMapper iotCompanyUserMapper;

    /**
     * 查询职工管理
     * 
     * @param id 职工管理主键
     * @return 职工管理
     */
    @Override
    public IotCompanyUser selectIotCompanyUserById(Long id)
    {
        return iotCompanyUserMapper.selectIotCompanyUserById(id);
    }

    @Override
    public IotCompanyUser selectIotCompanyUserByUid(Long uid)
    {
        return iotCompanyUserMapper.selectIotCompanyUserByUid(uid);
    }

    @Override
    public IotCompanyUser selectIotCompanyUser(IotCompanyUser iotCompanyUser)
    {
        return iotCompanyUserMapper.selectIotCompanyUser(iotCompanyUser);
    }

    /**
     * 查询职工管理列表
     * 
     * @param iotCompanyUser 职工管理
     * @return 职工管理
     */
    @Override
    public List<IotCompanyUser> selectIotCompanyUserList(IotCompanyUser iotCompanyUser)
    {
        return iotCompanyUserMapper.selectIotCompanyUserList(iotCompanyUser);
    }

    /**
     * 新增职工管理
     * 
     * @param iotCompanyUser 职工管理
     * @return 结果
     */
    @Override
    public int insertIotCompanyUser(IotCompanyUser iotCompanyUser)
    {
        iotCompanyUser.setCreateTime(DateUtils.getNowDate());
        return iotCompanyUserMapper.insertIotCompanyUser(iotCompanyUser);
    }

    /**
     * 修改职工管理
     * 
     * @param iotCompanyUser 职工管理
     * @return 结果
     */
    @Override
    public int updateIotCompanyUser(IotCompanyUser iotCompanyUser)
    {
        iotCompanyUser.setUpdateTime(DateUtils.getNowDate());
        return iotCompanyUserMapper.updateIotCompanyUser(iotCompanyUser);
    }

    /**
     * 批量删除职工管理
     * 
     * @param ids 需要删除的职工管理主键
     * @return 结果
     */
    @Override
    public int deleteIotCompanyUserByIds(Long[] ids)
    {
        return iotCompanyUserMapper.deleteIotCompanyUserByIds(ids);
    }

    /**
     * 删除职工管理信息
     * 
     * @param id 职工管理主键
     * @return 结果
     */
    @Override
    public int deleteIotCompanyUserById(Long id)
    {
        return iotCompanyUserMapper.deleteIotCompanyUserById(id);
    }
}
